import request from '@/utils/request'


// 新增需求单
export default {
  daochu() {
    return request({
      url: `/file/need/export`,
      method: 'get'
    })
  },
  all() {
    return request({
      url: `/need/need/findAll`,
      method: 'get'
    })
  },
  saveNeed(data) {
    console.log('我到这来了',data)
    return request({
      url: `/need/need/save`,
      method: 'post',
      data:data
    })
  },
  // 查询出列表
  list(currentPage,pageSize) {
    return request({
      url: `/need/need/list/${currentPage}/${pageSize}`,
      method: 'get',
    })
  },
  // 根据ID查询信息
  info(id) {
    return request({
      url: `/need/need/info/${id}`,
      method: 'get'
    })
  },
  // 修改需求单
  update(data) {
    return request({
      url: `/need/need/update`,
      method: 'post',
      data: data
    })
  },

  // 删除1个或删除多个
  deleteAll(data) {
    return request({
      url: `/need/need/delete`,
      method: 'delete',
      data: data
    })
  }
}
